/*
  File: Pattern.cs
  Author: rcrxy
  CreateTime: 2025/07/02 14:05

  Description: 正则列表
*/

namespace StudentVideo.Shared.Constants;

public class Pattern {
   /// <summary>
   /// 身份证
   /// </summary>
   public const string IdCardPattern = @"^\d{15}$|^\d{17}(\d|X|x)$";

   /// <summary>
   /// 用户账户
   /// </summary>
   public const string AccountPattern = @"^[a-zA-Z0-9]+$";

   /// <summary>
   /// 用户密码
   /// </summary>
   public const string PasswordPattern = @"^[a-zA-Z0-9]{4,16}$";

   /// <summary>
   /// 手机号码
   /// </summary>
   public const string PhonePattern = @"^1[3-9]\d{9}$";

   /// <summary>
   /// 学号
   /// </summary>
   public const string StudentIdPattern = @"^[0-9]{10}$";

   /// <summary>
   /// 格式化日期时间
   /// </summary>
   public const string FormatDateTimePattern = @"^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|1\d|2\d|3[01])[ T](0\d|1\d|2[0-3]):([0-5]\d):([0-5]\d)(\.\d{3})?$";

   /// <summary>
   /// 格式化日期
   /// </summary>
   public const string FormatDatePattern = @"^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|1\d|2\d|3[01])";
}
